<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>标题</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/lib/layui/css/layui.css">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<form class="layui-form" style="margin-top: 10px;">
    <input type="hidden" id="orgType" name="orgType">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label" style="width: 100px;">机构名称：</label>
            <div class="layui-input-inline">
                <input type="text" name="orgName" id="orgName" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label" style="width: 100px;">法人代表：</label>
            <div class="layui-input-inline">
                <input type="text" name="roleCode" id="roleCode" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-inline">
            <div class="layui-input-inline">
                <button class="layui-btn layui-btn-sm" lay-submit lay-filter="formDemo">搜索</button>
                <button class="layui-btn layui-btn-sm" >清空</button>
            </div>
        </div>

    </div>
</form>
<table class="layui-hide" id="dataList" lay-filter="dataList"></table>

<script type="text/javascript" src="/lib/layui/layui.js"></script>
<script src="/static/js/main.js"></script>
<script>
    var table = {};
    layui.use(['jquery', 'configureCom', 'configure', 'sessionFun', 'table'], function () {
        var $ = layui.jquery;
        var configure = layui.configure;
        table = layui.table;
        var sessionFun = layui.sessionFun;
        var configureCom = layui.configureCom;

        // 查询企业的类型
        var orgType = configureCom.GetQueryString('orgType');
        $("#orgType").val(orgType);

        var cols = [[
            {type: 'checkbox'},
            {title: '序号', type: 'numbers'},
            {field: 'orgName', width:250, title: '机构名称'},
            {field: 'creditCode', width:250,title: '社会统一信用代码'},
            {field: 'comartiperson', width:100,title: '法人代表'},
            {field: 'createTime',width:220, title: '地址',templet: function (d) {
                    return d.provinceName+' '+d.cityName+' '+ d.countyName;
                }
            }
        ]];
        configureCom.tableRender(configure.ORG_LIST_HTTP, {orgType:orgType}, cols, 'dataList', 10, 'full-100', 'toolbarOrg');
        configureCom.tableSearch();


    });


    function getData(){
        return table.checkStatus('dataList').data;
    }


</script>
</body>
</html>